home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-22 | 2.5 KB | 87 lines | [TEXT/MPCC] |
- //
- // File: MacApplication.h
- //
- // Contains: Functions that could be overridden in a specific application.
- //
- // Written by: Tim Monroe
- // Based on the MovieShell code written by Apple DTS
- // Parts modeled on BoxMoov code by Nick Thompson, Rick Evans, and Robert Dierkes
- // and on code in QD3D book (by yours truly!)
- //
- // Copyright: © 1994-1996 by Apple Computer, Inc., all rights reserved.
- //
- // Change History (most recent first):
- //
- // <3> 12/13/96 rtm added application-specific data structure
- // <2> 11/27/96 rtm conversion to personal coding style
- // <1> 12/21/94 khs first file
- //
- //
-
- #pragma once
- #include "QD3D.h"
- #include "Texture.h"
-
- // application-specific constants
- // for menus
-
- enum eAppMenus {
- mTesting = 131,
- mObjects = 132
- };
-
- enum eTestingMenu {
- iTest1 = 1,
- iTest2,
- iTest3,
- iTest4,
- iTest5,
- iTest6,
- iTest7,
- iTest8,
- iTest9,
- iTest10
- };
-
- enum eObjectsMenu {
- iBox = 1,
- iCone,
- iCylinder,
- iEllipsoid,
- iTorus,
- iPolyhedron,
- i3DMFFile
- };
-
-
- //////////
- // structures
- //////////
-
- // application-specific window data
-
- typedef struct {
- WindowPtr fWindow; // the window associated with this document
- TQ3ViewObject fView; // the view for the scene
- TQ3GroupObject fModel; // the 3D object in the scene being modelled
- TQ3StyleObject fInterpolation; // interpolation style used when rendering
- TQ3StyleObject fBackFacing; // whether to draw shapes that face away from the camera
- TQ3StyleObject fFillStyle; // whether drawn as solid filled object or decomposed to components
- TQ3Matrix4x4 fRotation; // the transform for the model
- TQ3Point3D fGroupCenter; // the center of the group (for rotation)
- float fGroupScale; // scaling factor to apply before drawing
- TextureHdl fTexture; // the texture for the 3D object
- GWorldPtr fGWorld; // the offscreen graphics world used for the pixmap draw context
- Boolean fTextureIsMovie; // is the texture from a QuickTime movie?
- Boolean fObjectIsAnimated; // is the 3D object being animated?
- Boolean fCameraChanged; // does the 3D camera need to be updated?
- Boolean fMustRender; // does the 3D overlay need to be rendered?
- Boolean fQTMovieHasSound; // does the embedded QuickTime movie have a sound track?
- Boolean fQD3DFOVIsVert; // is the QD3D camera FOV vertical?
- short fObjectIndex; // index of the current predefined 3D object
- } ApplicationDataRecord, *ApplicationDataPtr, **ApplicationDataHdl;
-
-
- // the function prototypes are in the file MacFramework.h
-
-